<script>
jQuery(document).ready(function($){	

	$("#voltar").click(function() {

		var unitid = "<?php echo $unitid?>";
		var url = "<?php echo WWW_APP.'units/vision/unit/'?>"+unitid; 

		window.location.href = url;
	}); 
});
</script>
<div id="questionsList">	
	<br /><br />
	<?php if(!empty($questions)) {?>
		<form id="form_questions" method="post">
			<?php
			$i = 1;	
			foreach($questions as $question) {	
			?>	
				<b>Questão <?php echo $i?> - <?php echo $question->question?></b>
				<br /><br />
				<input type="hidden" name="question_<?php echo $question->id?>" value=null >
				<input type="radio" name="question_<?php echo $question->id?>" value="1"> 
				<?php echo $question->answer_1.'<br />'?>
				<input type="radio" name="question_<?php echo $question->id?>" value="2"> 
				<?php echo $question->answer_2.'<br />'?>
				<input type="radio" name="question_<?php echo $question->id?>" value="3"> 
				<?php echo $question->answer_3.'<br />'?>
				<input type="radio" name="question_<?php echo $question->id?>" value="4"> 
				<?php echo $question->answer_4.'<br />'?>
				<input type="radio" name="question_<?php echo $question->id?>" value="5"> 
				<?php echo $question->answer_5.'<br /><br /><hr><br />'?>	
			<?php 
				$i++;
			}
			?>
			
			<input id="submit" type="submit" value="Submeter respostas">
			<input id="cancel" type="button" value="Cancelar">		
		</form>
	<?php }else { ?>
		Não existe questões cadastradas no banco de dados.
		<br /></br />
		<input id="voltar" type="button" value="Voltar">		
	<?php }?>
</div>